package com.family.model;

import com.alibaba.fastjson.JSON;

import java.io.Serializable;

/**
 * 字辈
 */
public class Generation implements Serializable {
    private int id;
    /**
     * 字辈
     */
    private String value;
    /**
     * 字辈对应的姓
     */
    private Name name;

    /**
     * 添加者
     */
    private User user;

    /**
     * 上个字辈
     */
    private Generation parentGeneration;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public Name getName() {
        return name;
    }

    public void setName(Name name) {
        this.name = name;
    }

    public Generation getParentGeneration() {
        return parentGeneration;
    }

    public void setParentGeneration(Generation parentGeneration) {
        this.parentGeneration = parentGeneration;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
